-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(overlay): safari :focus-visible inconsistency when using overlay type modal #4912
base: main
Are you sure you want to change the base?
Conversation
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Pull Request Test Coverage Report for Build 12003603906Details
💛 - Coveralls |
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Tachometer resultsChromeaction-bar permalinkbasic-test
action-button permalinkbasic-test
action-group permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
alert-banner permalinkbasic-test
alert-dialog permalinkbasic-test
breadcrumbs permalinkbasic-test
button-group permalinkbasic-test
button permalinktest-basic
coachmark permalinkbasic-test
combobox permalinkbasic-test
light-dom-test permalink
contextual-help permalinkbasic-test
dialog permalinkbasic-test
infield-button permalinkbasic-test
menu permalinktest-basic
number-field permalinkbasic-test
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker-button permalinkbasic-test
picker permalinkbasic-test
popover permalinktest-basic
search permalinktest-basic
slider permalinktest-basic
tags permalinkbasic-test
toast permalinktest-basic
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
Firefoxaction-bar permalinkbasic-test
action-button permalinkbasic-test
action-group permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
alert-banner permalinkbasic-test
alert-dialog permalinkbasic-test
breadcrumbs permalinkbasic-test
button-group permalinkbasic-test
button permalinktest-basic
coachmark permalinkbasic-test
combobox permalinkbasic-test
light-dom-test permalink
contextual-help permalinkbasic-test
dialog permalinkbasic-test
infield-button permalinkbasic-test
menu permalinktest-basic
number-field permalinkbasic-test
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker-button permalinkbasic-test
picker permalinkbasic-test
popover permalinktest-basic
search permalinktest-basic
slider permalinktest-basic
tags permalinkbasic-test
toast permalinktest-basic
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
|
|
||
// This fails but when manually tested it works in the browser | ||
// in the test it shows that the tooltip is open (overlayTrigger.open === 'hover') | ||
// expect(overlayTrigger.open).to.be.undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would appreciate any feedback/ideas on why would this be flaky, couldn't yet figure out why this would fail if manually tested it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iinnnteresting
await closed; | ||
|
||
// Manually testing this in the browser doesn't fail without the handleKeyup method but it should | ||
// expect(overlayTrigger.open).to.equal('hover'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here as in the previous test.
@mizgaionutalexandru Thanks for doing this! Shaping up well! By any chance were you able to test this in a touch interface? |
Yes, I have tested this on mobile and tablet simulators as well as a real iPad device. It seems to work just fine. I don't know why the written tests fail though. |
d33732c
to
9c7e5eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated so as to make sure the hover
tooltip opens in the following case on other browsers too.
- Click on the trigger open the popover
- press escape
(expect the hover to be opened again)
Description
This PR makes so that the tooltip isn't shown after a click overlay (e.g. popover) is opened in Safari in a
type="modal"
overlay, to have the same behaviour as in Chrome/Firefox. The inconsistency comes from the different heuristics Webkit uses to apply thefocus-visible
pseudo-class on elements.Related issue(s)
Motivation and context
The main motivation is consistency across browsers/engines.
How has this been tested?
These test cases have been tested in Safari as well as other supported browsers (e.g. Chrome).
Test case 1
type="modal"
and a click and hover effectTest case 2
type="modal"
and a click and hover effectDid it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Screenshots (if appropriate)
Before the fix:
before.mov
After the fix:
after.mov
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.